package com.ericsson.epc.modules.trace.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.common.util.LogFileName;
import com.ericsson.common.util.LoggerUtils;
import com.ericsson.epc.modules.trace.task.SignallingTraceTask;
import com.ericsson.epc.modules.trace.task.SignallingTraceTask_OLD;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 信令追踪 生成pcap包和流程图文件
 * @author zhuguangrui
 * @date 2021-03-17
 */
@Component
public class SignallingTraceJob implements MainJob {

    public static final String JOB_NAME = "SignallingTraceJob";
    private final Logger log = LoggerUtils.Logger(LogFileName.SignallingTraceJob);
    @Autowired
    private QuartzTableManager quartzTableManager;
    @Autowired
    private SignallingTraceTask_OLD signallingTraceTask;

    @Override
    public void doTask() {
        log.info("===== do SignallingTraceJob start =====");
        //signallingTraceTask.execute();
        quartzTableManager.addManualTaskJob(
                JOB_NAME,JOB_NAME, JOB_NAME,JOB_NAME,
                ManualQuartzJob.class,"0 15 * * * ?",signallingTraceTask);
    }
}
